﻿using BigEgg.Framework.Foundation.Validations;
using FMStudio.Domain.Properties;
using System;
using System.ComponentModel.DataAnnotations;

namespace FMStudio.Domain
{
    public interface IBill
    {
        DateTime Date { get; set; }

        bool Out { get; set; }

        Int64 Index { get; set; }

        [Required(ErrorMessageResourceName = "PayTypeMandatory", ErrorMessageResourceType = typeof(Resources))]
        String PayTypeString { get; set; }  //  Start with "0" means PayType, "1" means PayTypeCategory

        [Required(ErrorMessageResourceName = "UseTypeMandatory", ErrorMessageResourceType = typeof(Resources))]
        IUseType UseType { get; set; }

        [Required(ErrorMessageResourceName = "ItemPriceMandatory", ErrorMessageResourceType = typeof(Resources))]
        IItemPrice ItemPrice { get; set; }

        [GreaterThan(0.0, ErrorMessageResourceName = "BillNumberGreater", ErrorMessageResourceType = typeof(Resources))]
        double Number { get; set; }

        [GreaterThanOrEqualTo(0.0, ErrorMessageResourceName = "BillDiscountGreaterOrEqual", ErrorMessageResourceType = typeof(Resources))]
        double Discount { get; set; }
    }
}
